package com.flycat.common.util;

import com.flycat.dao.po.ProductInfo;
import com.google.common.collect.Lists;

import java.util.List;

/**
 * Created by linkun on 2017/10/4.
 */
public class CollectionUtils {
    public static <T> List<T> addAll(List<T> productModels, List<T> productModels1) {
        List<T> result = Lists.newArrayList();
        if (!org.springframework.util.CollectionUtils.isEmpty(productModels)) {
            result.addAll(productModels);
        }
        if (!org.springframework.util.CollectionUtils.isEmpty(productModels1)) {
            result.addAll(productModels1);
        }
        return result;
    }

    public static<T> boolean isNotEmpty(List<T> list) {
        return !org.springframework.util.CollectionUtils.isEmpty(list);
    }

    public static<T>  boolean isEmpty(List<T> list) {
        return org.springframework.util.CollectionUtils.isEmpty(list);
    }
}
